package com.company.project.learning.thread;

/**
 * @Author: zhaoqi
 * @Date: 11/16/2019 10:14 PM
 * @Version 1.0
 */

public class DemoRunable implements Runnable {

    private String name;

    public DemoRunable(String name) {
        this.name = name;
    }

    @Override
    public void run() {
        for (int i = 0; i < 5; i++) {
            for (int j = 0; j < 10000; j++) {
                System.out.println(name + j);
            }
        }
    }

    public static void main(String[] args) {
        DemoRunable demo1 = new DemoRunable("李白");
        DemoRunable demo2 = new DemoRunable("张飞");
        demo1.run();
        demo1.run();
    }

}
